package com.dabaozhan.modules.wx_app.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.dabaozhan.modules.wx_app.entity.SupplierUserEntity;
import com.dabaozhan.modules.wx_app.entity.SupplierUserQueryEntitiy;

@Mapper
public interface SupplierUserMapper {
	
	public int addSupplierUser(SupplierUserEntity supplierUser);
	/**
	 * 查询供应商用户信息
	 * @param phone 手机号码 防止重复添加
	 * @return
	 */
	public SupplierUserEntity getSupplierUserByPhone(@Param("phone")String phone,@Param("packerId")String packerId);
	
	/**
	 * 查询供应商用户信息
	 * @return
	 */
	public List<SupplierUserEntity> getSupplierUserForPage(SupplierUserQueryEntitiy entity);
	
	/**
	 * 查询分页总数据量
	 * @param entity
	 * @return
	 */
	public long getCountForPage(SupplierUserQueryEntitiy entity);
	
	/**
	 * 删除供应商用户   (状态置为无效)
	 * @param phone
	 * @return
	 */
	public int deleteSupplierUser(@Param("userId")String userId,@Param("packerId")String packerId);
	
	/**
	 * 更新供应商信息
	 * @param supplierUser
	 * @return
	 */
	public int updateSupplierUser(SupplierUserEntity supplierUser);

}
